package fr.ralmn.OgameDroid.Frame;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import fr.ralmn.OgameDroid.R;
import fr.ralmn.OgameDroid.Util;
import fr.ralmn.OgameDroid.Object.Objects;
import fr.ralmn.OgameDroid.Object.Technologie;

public class Techno_Info extends Fragment {
	public static Technologie technologie = Objects.Armes;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup c,
			Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.techno_info, c, false);
		technologie = Util.getTechnologie(getActivity().getIntent().getExtras()
				.getString("technologie"));
		TextView e_name = (TextView) v.findViewById(R.id.name_techno);
		e_name.setText(technologie.getName());

		TextView e_desc = (TextView) v.findViewById(R.id.desc_techno);
		e_desc.setText(technologie.getDesc());

		ImageView img = (ImageView) v.findViewById(R.id.img_techno);
		img.setImageResource(technologie.getIcon());

		return v;
	}

}
